home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RICompactDisklib.doc < prev    next >
Encoding:
Text File  |  1995-01-28  |  8.0 KB  |  266 lines

  1. -----------------------------------------------------------------------------
  2. ----               RI Compact Disc Library V1.3 (C)94/95                 ----
  3. -----------------------------------------------------------------------------
  4.  
  5.                 Written By Stephen McNamara & Steven Matty
  6.                        ©94/95 Leading Edge Software
  7.  
  8.  
  9. Command list:
  10.         OpenCD
  11.         CloseCD
  12.         CDDoor On/Off
  13.         CDPlayTrack track#,numtracks
  14.         CDReadTOC
  15.         CDStatus
  16.         CDStop
  17.         CDVolume volume,lengthofffade
  18.         CDNumTracks
  19.         CDFirstTrack
  20.         CDLastTrack
  21.         CDTrackLength track#
  22.         CDFlush
  23.         CDPause On/Off
  24.         CDRewind
  25.         CDFastForward
  26.         CDNormalSpeed
  27.         CDSpeed mode
  28.         CDUpdateInfo
  29.         CDTrackMins [offset]
  30.         CDTrackSecs [offset]
  31.         CDTrackPlaying
  32.  
  33.  
  34. Statement/Function: OpenCD
  35. ------------------------------------------------------------------------
  36. Modes : Amiga/Blitz
  37. Syntax: [suc=]OpenCD
  38.  
  39.   Attempts to open the cd.device for use my the library.  If used as a
  40. function it returns true or false to say whether the device was opened
  41. successfully.  You must use this command before you attempt to use any of
  42. the other commands in this library.
  43.  
  44.  
  45. Statement/Function: CloseCD
  46. ------------------------------------------------------------------------
  47. Modes : Amiga/Blitz
  48. Syntax: [suc=]CloseCD
  49.  
  50.   You must close the cd.device before your program ends.  Close the device
  51. by using this command.
  52.  
  53.  
  54. Statement: CDDoor
  55. ------------------------------------------------------------------------
  56. Modes : Amiga/Blitz
  57. Syntax: CDDoor On/Off
  58.  
  59.   Controls the status of the cd tray on your cd drive.  Giving a value of
  60. On (non-zero) with this command will cause the tray to open, Off will cause
  61. the tray to close
  62.  
  63.  
  64. Statement/Function: CDPlayTrack
  65. ------------------------------------------------------------------------
  66. Modes : Amiga/Blitz
  67. Syntax: CDPlayTrack track#,numtracks
  68.  
  69.   Use this command to make the cd drive play one or more audio tracks on
  70. the currently inserted compact disc.  Tracks are numbered from one but you
  71. should make sure that track one is an audio track, since CD-ROMs store
  72. program data on track one.  The numtracks arguement allows you to play
  73. more than one track without extra commands.  When the cd player reaches the
  74. end of the track it will move straight onto the next track automatically if
  75. you specified to play more than one.
  76.   This command can return a value to you if desired.  A return value of
  77. true means that the command succeeded, else false means failure.
  78.  
  79.  
  80. Statement/Function: CDReadTOC
  81. ------------------------------------------------------------------------
  82. Modes : Amiga/Blitz
  83. Syntax: [suc=]CDReadTOC
  84.  
  85.   Read the table of contents off the current CD.  This most be done before
  86. you attempt to obtain information about tracks/try to play a track.  This
  87. command can optionally return true or false to say whether or not it
  88. succeeded.
  89.  
  90.  
  91. Function: CDStatus
  92. ------------------------------------------------------------------------
  93. Modes : Amiga/Blitz
  94. Syntax: status=CDStatus
  95.  
  96.   Returns the status information for the cd.device.  This data includes the
  97. current status of the cd drive, and whether or not there is a compact disc
  98. inserted into it.  The return value is a binary number, with the following
  99. bits being of interest:
  100.  
  101. Name                Bit number     Meaning
  102. ------------------------------------------
  103. CDSTSB_CLOSED        0           Drive door is closed
  104. CDSTSB_DISK        1           A disk has been detected
  105. CDSTSB_SPIN        2           Disk is spinning (motor is on)
  106. CDSTSB_TOC        3           Table of contents read.  Disk is valid.
  107. CDSTSB_CDROM        4           Track 1 contains CD-ROM data
  108. CDSTSB_PLAYING        5           Audio is playing
  109. CDSTSB_PAUSED        6           Pause mode (pauses on play command)
  110. CDSTSB_SEARCH        7           Search mode (Fast Forward/Fast Reverse)
  111. CDSTSB_DIRECTION    8           Search direction (0 = Forward, 1 = Reverse)
  112.  
  113. It is possible to get more than one bit set at a time in the variable so
  114. you should not do straight comparisions with the return value.  Use the &
  115. operator to test for different statuses, e.g.
  116.  
  117.         If (CDStatus & %1) then NPrint "CD tray is closed!"
  118.  
  119.  
  120. Statement: CDStop
  121. ------------------------------------------------------------------------
  122. Modes : Amiga/Blitz
  123. Syntax: CDStop
  124.  
  125.   Causes the cd player to stop playing the current track.
  126.  
  127.  
  128. Statement/Function: CDVolume
  129. ------------------------------------------------------------------------
  130. Modes : Amiga/Blitz
  131. Syntax: CDVolume volume,lengthoffade
  132.  
  133. Gotta find out :)
  134.  
  135.  
  136. Function: CDNumTracks
  137. ------------------------------------------------------------------------
  138. Modes : Amiga/Blitz
  139. Syntax: num=CDNumTracks
  140.  
  141.   Get the total number of tracks on the currently inserted compact disc.
  142. Should be used only after the table of contents has been read using
  143. CDReadTOC.
  144.  
  145.  
  146. Function: CDFirstTrack
  147. ------------------------------------------------------------------------
  148. Modes : Amiga/Blitz
  149. Syntax: num=CDFirstTrack
  150.  
  151.   Returns the first track on the disc available for playing using the
  152. CDPlayTrack command.
  153.  
  154.  
  155. Function: CDLastTrack
  156. ------------------------------------------------------------------------
  157. Modes : Amiga/Blitz
  158. Syntax: num=CDLastTrack
  159.  
  160.   Returns the last track on the disc available for playing using the
  161. CDPlayTrack command.
  162.  
  163.  
  164. Function: CDTrackLength
  165. ------------------------------------------------------------------------
  166. Modes : Amiga/Blitz
  167. Syntax: l=CDTrackLength(track#)
  168.  
  169.   Returns the length in seconds of the selected track.  The track# should
  170. be checked to make sure that it exists on the compact disc.
  171.  
  172.  
  173. Statement: CDFlush
  174. ------------------------------------------------------------------------
  175. Modes : Amiga/Blitz
  176. Syntax: CDFlush
  177.  
  178. Gotta find out :)
  179.  
  180.  
  181. Statement: CDPause
  182. ------------------------------------------------------------------------
  183. Modes : Amiga/Blitz
  184. Syntax: CDPause On/Off
  185.  
  186.   This command is used to either make the cd player pause on the currently
  187. playing track, or restart after being paused.  If you set pause on whilst
  188. a track is not playing, and then attempt to play a track the cd player will
  189. go straight into pause mode.
  190.  
  191.  
  192. Statement: CDRewind
  193. ------------------------------------------------------------------------
  194. Modes : Amiga/Blitz
  195. Syntax: CDRewind
  196.  
  197.   Set the cd player into rewind mode.
  198.  
  199.  
  200. Statement: CDFastForward
  201. ------------------------------------------------------------------------
  202. Modes : Amiga/Blitz
  203. Syntax: CDFastForward
  204.  
  205.  
  206.   Set the cd player into fastforward mode.
  207.  
  208.  
  209. Statement: CDNormalSpeed
  210. ------------------------------------------------------------------------
  211. Modes : Amiga/Blitz
  212. Syntax: CDNormalSpeed
  213.  
  214.   Restore the cd player to normal playing speed.
  215.  
  216.  
  217. Statement: CDSpeed
  218. ------------------------------------------------------------------------
  219. Modes : Amiga/Blitz
  220. Syntax: CDSpeed speed
  221.  
  222.   Set the cd player speed directly using the value in the speed parameter.
  223.  
  224.  
  225. Statement: CDUpdateInfo
  226. ------------------------------------------------------------------------
  227. Modes : Amiga/Blitz
  228. Syntax: CDUpdateInfo
  229.  
  230.   This command is used to update the current track information whilst a
  231. compact disc is actually playing.  After it has been called, the commands
  232. CDTrackMins, CDTrackSecs and CDTrackPlaying will return information about
  233. the current track.
  234.  
  235.  
  236. Function: CDTrackMins
  237. ------------------------------------------------------------------------
  238. Modes : Amiga/Blitz
  239. Syntax: num=CDTrackMins[(offset)]
  240.  
  241.   Returns the current time from start of the track for the currently
  242. playing cd track.  The optional parameter offset can take the value of 0 or
  243. 1.  IF offset=1 is passed, the time returned will reflect the playing time
  244. from the start of the compact disc, rather than from the start of the
  245. track.
  246.  
  247.  
  248. Function: CDTrackSecs
  249. ------------------------------------------------------------------------
  250. Modes : Amiga/Blitz
  251. Syntax: num=CDTrackSecs[(offset)]
  252.  
  253.   Returns the current time from start of the track for the currently
  254. playing cd track.  The optional parameter offset can take the value of 0 or
  255. 1.  IF offset=1 is passed, the time returned will reflect the playing time
  256. from the start of the compact disc, rather than from the start of the
  257. track.
  258.  
  259.  
  260. Function: CDTrackPlaying
  261. ------------------------------------------------------------------------
  262. Modes : Amiga/Blitz
  263. Syntax: num=CDTrackPlaying
  264.  
  265.   Returns the number of the currently playing cd track.
  266.